package com.xuebusi.common.util;

import org.springframework.util.StringUtils;

public class CommonUtil {

    /**
     * 判断数字能否转成int或long
     * @Author shiyanjun
     * @Date 2018/9/24 上午7:55
     * @Param
     * @Return
     * @Exception
     */
    public static boolean toString(String number) {
        if (StringUtils.isEmpty(number)) {
            return false;
        }
        try {
            Long.parseLong(number);
        } catch (NumberFormatException e) {
            return false;
        }
        return true;
    }
}
